package com.os;

/**
 * @Author Matt
 * @Date 2022-09-02
 * @Desc:
 * @Version V1.0
 */
public class LambdaDemo6 {

    public static void main(String[] args) {
        useInter(() -> {
            System.out.println("lambda表达式");
        });

        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("匿名内部类");
            }
        }).start();

        Runnable runnable = () -> System.out.println("lambda表达式");
        new Thread(runnable).start();

        new Thread(() -> {
            System.out.println("lambda表达式");
        }).start();


    }

    private static void useInter(Inter inter){
        inter.show();
    }
}
